package com.selfdriving.activity;

import com.selfdriving.R;
import com.selfdriving.dialog.FlippingLoadingDialog;
import com.selfdriving.utils.PhotoUtil;

import net.tsz.afinal.annotation.view.ViewInject;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

public class FeatureRecordActivity extends BaseActivity {
	@ViewInject(id = R.id.ivIcon)
	ImageView ivIcon;

	@ViewInject(id = R.id.btnChange, click = "btnChange")
	Button btnChange;
	
	@ViewInject(id = R.id.btnAdd, click = "btnAdd")
	Button btnAdd;
	
	private FlippingLoadingDialog dialog;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.feature_record);
		dialog = new FlippingLoadingDialog(this, "皮肤下载中 请稍后");
		//ivIcon.setBackgroundDrawable(getResources().getDrawable(R.drawable.background));
	}

	@Override
	protected void onResume() {
		super.onResume();
	}
	
	public void btnChange(View v){
		new Thread(new Runnable() {
			@Override
			public void run() {
				PhotoUtil.getDrawable("http://imgsrc.baidu.com/forum/w%3D580%3Bcp%3Dtieba%2C10%2C477%3Bap%3D%CE%E2%BA%E8%E7%F9%B0%C9%2C90%2C485/sign=e1efef19b1de9c82a665f9875cbae37a/cc080ff0f736afc30a863445b119ebc4b64512cb.jpg");
			}
		}).start();
	}
	
	public void btnAdd(View v){
		Intent intent = new Intent(this,AddFeatureRecordActivity.class);
		startActivity(intent);
	}

}
